﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SvnUpdater
{
    class Program
    {
        static SVNUpdater updater = null;
        static void Main(string[] args)
        {
            TimerConfig config;
            try
            {
                updater = new SVNUpdater();
                config = new TimerConfig(5);
            }
            catch (AppSettingsException ex)
            {
                Console.WriteLine(ex.Message);
                return;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                return;
            }

            ExecuteTimer timer = new ExecuteTimer(config);
            timer.elapsed_event += new ElapsedEvent(timer_elapsed_event);
            timer.Execute();
        }
        static void timer_elapsed_event()
        {
            //Console.WriteLine("afd");
            updater.Update();
        }
    }
}
